const KEY = "slwl-token";
const kk = "user-info";

export const setToken = (newToken) => {
  localStorage.setItem(KEY, newToken);
};

export const getToken = () => {
  return localStorage.getItem(KEY);
};

export const removeToken = () => {
  localStorage.removeItem(KEY);
};
export const setUserInfo = (userInfo) => {
  localStorage.setItem(kk, JSON.stringify(userInfo));
  // console.log(JSON.stringify(userInfo));
};

export const getUserInfo = () => {
  return JSON.parse(localStorage.getItem(kk));
};

export const removeUserInfo = () => {
  localStorage.removeItem(kk);
};
